<template>
  <div id="app">
    <router-view/>
	<Footer v-show="showflag"></Footer>
  </div>
</template>

<script>
	import Footer from "@/components/Footer.vue"
	export default{
		name:"App",
		data(){
			return{
				showflag:false//默认不展示底部
			}
		},
		components:{
			Footer
		},
		watch:{//只有watch可以监控路由的变化
			"$route":{
				handler(value){
					//console.log(value.meta.isShow);
					this.showflag=value.meta.isShow;
				},
				immediate:true
			}
		}
	}
</script>

<style lang="less">
</style>
